<html>
<head><meta charset="utf-8"><title>meeting 2020-07-21 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html">meeting 2020-07-21</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204535115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204535115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204535115">(Jul 21 2020 at 11:13)</a>:</h4>
<p>Hey y'all, sorry for the late notice but I can't make a sync meeting today. Do you want to chat over Zulip async or try to reschedule for another day?</p>



<a name="204582824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204582824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204582824">(Jul 21 2020 at 18:15)</a>:</h4>
<p>We can go for Zulip async</p>



<a name="204585537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204585537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204585537">(Jul 21 2020 at 18:37)</a>:</h4>
<p>Status:</p>
<ul>
<li>
<p><a href="https://github.com/rust-lang/project-rfc-2229/issues/7">https://github.com/rust-lang/project-rfc-2229/issues/7</a><br>
We have been prototyping using places for storing capture information. <br>
Currently instead of replacing old structures with the new one, we are creating a bridge. So we generate the new structure and use it to build the old structures. We ran into some issues with the MIR build having errors.<br>
We got some tips this week on how to do things properly (use env variable to decide on which impl to use) and compile rustc using old style and debug our new thing on a smaller peice of code). We will be trying this out today/tomorrow. <br>
This (hopefully) explains the bridge for capture analysis a little better: <a href="https://github.com/rust-lang/project-rfc-2229/blob/progress/progress.md#capture-analysis">https://github.com/rust-lang/project-rfc-2229/blob/progress/progress.md#capture-analysis</a></p>
</li>
<li>
<p><a href="https://github.com/rust-lang/project-rfc-2229/issues/4">https://github.com/rust-lang/project-rfc-2229/issues/4</a><br>
Also working on replacing tuple of inference variables that would later represent types of captured paths with a single inference variable that then get replaces with a tuple of types of captured paths. Seems to be going well, we can compile parts of the changes now. We have some questions about is_valid and I have asked it on the tupled upvars thread</p>
</li>
<li>
<p>We have started on drafting sort of a RFC2229 doc you had mentioned last meeting. <a href="https://github.com/rust-lang/project-rfc-2229/blob/progress/progress.md">https://github.com/rust-lang/project-rfc-2229/blob/progress/progress.md</a></p>
</li>
<li>
<p>I wrote my thoughts on documenting minimal capture here: <a href="https://github.com/rust-lang/project-rfc-2229/issues/9">https://github.com/rust-lang/project-rfc-2229/issues/9</a><br>
If we go the trie/prefix tree route, answering questions like if a path is captured will come dwn to if for a given path there is some prefix that was captured.</p>
</li>
<li>
<p>We should probably have the <a href="https://github.com/rust-lang/rust/issues/53488">tracking issue</a> just point to the <a href="https://github.com/rust-lang/project-rfc-2229/projects/1">project board</a></p>
</li>
</ul>



<a name="204593100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204593100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204593100">(Jul 21 2020 at 19:36)</a>:</h4>
<p>Actually I am around a bit after all</p>



<a name="204593541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204593541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204593541">(Jul 21 2020 at 19:39)</a>:</h4>
<p>Regarding the bridge: OK, that sounds reasonable. One thing to note is that we are <em>always</em> going to have to support the current mode of 'just capture the root variable'. My expectation is that we'll phase in this new RFC along an edition boundary, so we'll still have to support the old mode. But I think this isn't a problem, it comes down to the question of "truncating" the place to just the root variable, as you already noted.</p>



<a name="204593620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204593620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204593620">(Jul 21 2020 at 19:40)</a>:</h4>
<p>You wrote:</p>
<blockquote>
<p>Keep closure_captures as it allows us to answer questions like if a root variable is part of a captured path quickly</p>
</blockquote>
<p>I'm not sure if you meant for this to be a permanent step or just temporary? I am assuming temporary.</p>



<a name="204594214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594214">(Jul 21 2020 at 19:44)</a>:</h4>
<blockquote>
<p>We have some questions about is_valid and I have asked it on the tupled upvars thread</p>
</blockquote>
<p>Answered on <a class="stream-topic" data-stream-id="189812" href="/#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/tupled.20upvar.20types.20.2357482">#t-compiler/wg-rfc-2229 &gt; tupled upvar types #57482</a></p>



<a name="204594481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594481">(Jul 21 2020 at 19:46)</a>:</h4>
<blockquote>
<p>I wrote my thoughts on documenting minimal capture here: <a href="https://github.com/rust-lang/project-rfc-2229/issues/9">https://github.com/rust-lang/project-rfc-2229/issues/9</a></p>
</blockquote>
<p>I would definitely try to keep the structure as simple as posible. As you suggested, hashing the "base" of the place and switching to a vector after that may be a good idea, though another decent approach might be just keeping a plain vector, or a sorted vector.</p>



<a name="204594535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594535">(Jul 21 2020 at 19:47)</a>:</h4>
<blockquote>
<p>We will capture rect.top_left.x as mutable borrow and rect.top_left as immutable borrow. Overall we want to capture rect.top_left as mutable borrow. This would be similar as handling different kinds of use of the same place.</p>
</blockquote>



<a name="204594543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594543">(Jul 21 2020 at 19:47)</a>:</h4>
<p>That sounds right, and it's an interesting example</p>



<a name="204594610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594610">(Jul 21 2020 at 19:47)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-21/near/204593620">said</a>:</p>
<blockquote>
<p>You wrote:</p>
<blockquote>
<p>Keep closure_captures as it allows us to answer questions like if a root variable is part of a captured path quickly</p>
</blockquote>
<p>I'm not sure if you meant for this to be a permanent step or just temporary? I am assuming temporary.</p>
</blockquote>
<p>I haven't completely looked at each part of the code that relies on this but depending on how the final strcuture looks like (to quicky ans questions abt paths) we might want this an initial check</p>



<a name="204594690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204594690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204594690">(Jul 21 2020 at 19:48)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-21/near/204594481">said</a>:</p>
<blockquote>
<blockquote>
<p>I wrote my thoughts on documenting minimal capture here: <a href="https://github.com/rust-lang/project-rfc-2229/issues/9">https://github.com/rust-lang/project-rfc-2229/issues/9</a></p>
</blockquote>
<p>I would definitely try to keep the structure as simple as posible. As you suggested, hashing the "base" of the place and switching to a vector after that may be a good idea, though another decent approach might be just keeping a plain vector, or a sorted vector.</p>
</blockquote>
<p>Okay this probably then eliminate closure_captures</p>



<a name="204595217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204595217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204595217">(Jul 21 2020 at 19:53)</a>:</h4>
<p>I think we probably just want one data structure</p>



<a name="204595226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204595226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204595226">(Jul 21 2020 at 19:53)</a>:</h4>
<p>but we should make it efficient</p>



<a name="204595241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204595241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204595241">(Jul 21 2020 at 19:53)</a>:</h4>
<p>well, I mean, as efficient as we have to :)</p>



<a name="204595255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204595255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204595255">(Jul 21 2020 at 19:53)</a>:</h4>
<p>I'd start with <em>simple</em> then worry about <em>efficient</em></p>



<a name="204596029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204596029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204596029">(Jul 21 2020 at 20:00)</a>:</h4>
<p>Okay I think that's all I have, we'll try fixing the closure_capture stuff by the end of this week</p>



<a name="204596153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/204596153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#204596153">(Jul 21 2020 at 20:01)</a>:</h4>
<p>Looking at the project board we seem to be in a nice position in terms of analysis after the current two in-work changes.</p>



<a name="205064007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/205064007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#205064007">(Jul 26 2020 at 19:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-21/near/204593541">said</a>:</p>
<blockquote>
<p>Regarding the bridge: OK, that sounds reasonable. One thing to note is that we are <em>always</em> going to have to support the current mode of 'just capture the root variable'. My expectation is that we'll phase in this new RFC along an edition boundary, so we'll still have to support the old mode. But I think this isn't a problem, it comes down to the question of "truncating" the place to just the root variable, as you already noted.</p>
</blockquote>
<p>We can't just drop projections,  it is used to figure out UniqueImmBorrow <br>
<a href="https://github.com/rust-lang/rust/blob/222d2508375a363be7a4f6ded3c9bd7be0803d19/src/librustc_typeck/check/upvar.rs#L322">https://github.com/rust-lang/rust/blob/222d2508375a363be7a4f6ded3c9bd7be0803d19/src/librustc_typeck/check/upvar.rs#L322</a></p>



<a name="205085789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-21/near/205085789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-21.html#205085789">(Jul 27 2020 at 06:44)</a>:</h4>
<p>Continuing this discussion in the thread we have been using for storing capture information using Places. <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/Typecheck.20tables.20using.20Places/near/205085676">https://rust-lang.zulipchat.com/#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/Typecheck.20tables.20using.20Places/near/205085676</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>